package com.itheima_1;

public class Demo_1 {
    public static void main(String[] args) throws InterruptedException {
        //获取当前运行的线程名称
       /* String name = Thread.currentThread().getName();
        System.out.println(name);*/
        /*System.out.println("睡觉前");
        Thread.sleep(5000);
        System.out.println("睡醒了");*/
        MyRunnable mr=new MyRunnable();
        Thread t1=new Thread(mr);
        Thread t2=new Thread(mr);
        t1.start();
        t2.start();
    }
}
